package com.qqtech.qquan.homemaking.service;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import com.qqtech.core.frame.dao.BaseDao;
import com.qqtech.core.frame.service.BaseServiceImpl;
import com.qqtech.qquan.homemaking.cache.HomemakingSysDictCache;
import com.qqtech.qquan.homemaking.dao.HomemakingSysDictDao;
import com.qqtech.qquan.homemaking.model.HomemakingSysDict;
import com.qqtech.qquan.homemaking.model.HomemakingSysDictVo;

@Service
public class HomemakingSysDictServiceImpl extends BaseServiceImpl<HomemakingSysDict>
		implements HomemakingSysDictService {
	public static final Logger log = LoggerFactory.getLogger(HomemakingSysDictServiceImpl.class);
	
	@Resource
	private HomemakingSysDictDao homemakingSysDictDao;
	
	@Resource
	private HomemakingSysDictCache homemakingSysDictCache;

	@Override
	protected BaseDao<HomemakingSysDict> getBaseDao() {
		return homemakingSysDictDao;
	}

	@Override
	public HomemakingSysDictVo getByTypeAndCode(String type, String code) {
		if (type == null || code == null) {
			return null;
		}
		return homemakingSysDictDao.getByTypeAndCode(type, code);
	}

	@Override
	public String getNameCache(String type, String code) {
		if (type == null || code == null) {
			return null;
		}
		return homemakingSysDictCache.dictValue(type, code);
	}
	
	
	
}